export default function adapter(props) {
  const onlineDevelopmentMode = import.meta.env.VITE_APP_ONLINE_DEVELOPMENT_MODE;
  if (import.meta.env.PROD || (onlineDevelopmentMode && !window.online_development_islocal)) {
    /**
     *  @example
     *  props.type = (props.type === "designConfiguration" ? "designConfiguration" : "main")
     *  props.changeConfiguration && (props.changeCustomConfig = props.changeConfiguration)
     *  if (props.type === "designConfiguration") {
     *    props.customConfig = JSON.parse(props.configuration)
     *  } else {
     *    props.customConfig = props.configuration
     *  }
     *
     */
    /**
     * 封装smardaten触发事件的方法
     * @param {String} eventName 事件名
     * @param {Object} payload 事件传参
     * @example
     * triggerEvent("click",{value:"123"})
     *
     */
    // props.triggerEvent = function (eventName, payload = {}) {
    //   props.componentId &&
    //     window.eventCenter?.triggerEventNew({
    //       objectId: props.appId,
    //       componentId: props.componentId,
    //       type: 'app',
    //       event: eventName,
    //       // payload需为一个object
    //       payload,
    //     });
    // };
  }
  return props;
}
